/*
 * Copyright (C) 2011 CrystalRange
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *    http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package org.crystalrange.enterprise.model;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import org.crystalrange.model.User;

public class SalesDocument implements Serializable {

    private static final long serialVersionUID = 1L;

    private Long id;
    private String description;
    private User createdBy;
    private Date createdDate;
    private User updatedBy;
    private Date updatedDate;
    private Customer soldToParty;
    private Location soldToPartyLocation;
    private Customer billToParty;
    private Location billToPartyLocation;
    private Customer shipToParty;
    private Location shipToPartyLocation;
    private SalesDocumentType salesDocumentType;
    private FiscalYear fiscalYear;
    private FiscalPeriod fiscalPeriod;
    private Currency currency;
    private SalesOrganization salesOrganization;
    private DistributionChannel distributionChannel;
    private Division division;
    private List<SalesDocumentItem> salesDocumentItems;

    public SalesDocument() {
        this.id = 0L;
        this.createdDate = new Date();
        this.updatedDate = new Date();
        this.salesDocumentItems = new ArrayList<SalesDocumentItem>();
    }

    public Long getId() {
        return this.id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getDescription() {
        return this.description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public User getCreatedBy() {
        return this.createdBy;
    }

    public void setCreatedBy(User createdBy) {
        this.createdBy = createdBy;
    }

    public Date getCreatedDate() {
        return this.createdDate;
    }

    public void setCreatedDate(Date createdDate) {
        this.createdDate = createdDate;
    }

    public User getUpdatedBy() {
        return this.updatedBy;
    }

    public void setUpdatedBy(User updatedBy) {
        this.updatedBy = updatedBy;
    }

    public Date getUpdatedDate() {
        return this.updatedDate;
    }

    public void setUpdatedDate(Date updatedDate) {
        this.updatedDate = updatedDate;
    }

    public Customer getSoldToParty() {
        return this.soldToParty;
    }

    public void setSoldToParty(Customer soldToParty) {
        this.soldToParty = soldToParty;
    }

    public Location getSoldToPartyLocation() {
        return this.soldToPartyLocation;
    }

    public void setSoldToPartyLocation(Location soldToPartyLocation) {
        this.soldToPartyLocation = soldToPartyLocation;
    }

    public Customer getBillToParty() {
        return this.billToParty;
    }

    public void setBillToParty(Customer billToParty) {
        this.billToParty = billToParty;
    }

    public Location getBillToPartyLocation() {
        return this.billToPartyLocation;
    }

    public void setBillToPartyLocation(Location billToPartyLocation) {
        this.billToPartyLocation = billToPartyLocation;
    }

    public Customer getShipToParty() {
        return this.shipToParty;
    }

    public void setShipToParty(Customer shipToParty) {
        this.shipToParty = shipToParty;
    }

    public Location getShipToPartyLocation() {
        return this.shipToPartyLocation;
    }

    public void setShipToPartyLocation(Location shipToPartyLocation) {
        this.shipToPartyLocation = shipToPartyLocation;
    }

    public SalesDocumentType getSalesDocumentType() {
        return this.salesDocumentType;
    }

    public void setSalesDocumentType(SalesDocumentType salesDocumentType) {
        this.salesDocumentType = salesDocumentType;
    }

    public FiscalYear getFiscalYear() {
        return this.fiscalYear;
    }

    public void setFiscalYear(FiscalYear fiscalYear) {
        this.fiscalYear = fiscalYear;
    }

    public FiscalPeriod getFiscalPeriod() {
        return this.fiscalPeriod;
    }

    public void setFiscalPeriod(FiscalPeriod fiscalPeriod) {
        this.fiscalPeriod = fiscalPeriod;
    }

    public Currency getCurrency() {
        return this.currency;
    }

    public void setCurrency(Currency currency) {
        this.currency = currency;
    }

    public SalesOrganization getSalesOrganization() {
        return this.salesOrganization;
    }

    public void setSalesOrganization(SalesOrganization salesOrganization) {
        this.salesOrganization = salesOrganization;
    }

    public DistributionChannel getDistributionChannel() {
        return this.distributionChannel;
    }

    public void setDistributionChannel(DistributionChannel distributionChannel) {
        this.distributionChannel = distributionChannel;
    }

    public Division getDivision() {
        return this.division;
    }

    public void setDivision(Division division) {
        this.division = division;
    }

    public List<SalesDocumentItem> getItems() {
        return this.salesDocumentItems;
    }

    public void setItems(List<SalesDocumentItem> items) {
        this.salesDocumentItems = items;
    }
}
